using Myotragus.Data.Containers;
using Myotragus.Data.Criteria;
using Myotragus.Data.Domain;

namespace Myotragus.Data.Repositories
{
	public class DefaultsLocalizableWriteRepository<TEntity, TId> :
		LocalizableWriteRepository<TEntity, TId>, 
		IDefaultsLocalizableWriteRepository<TEntity, TId>
		where TEntity : IEntity<TId>
	{
		public DefaultsLocalizableWriteRepository(
			IEntitiesContainer entities,
			IDefaultsLocalizableWriteQueryBuilder<TEntity, TId> queryBuilder)
			: base(entities, queryBuilder)
		{
			QueryBuilder = queryBuilder;
		}
		
		protected new IDefaultsLocalizableWriteQueryBuilder<TEntity, TId> QueryBuilder
		{
			get;
			private set;
		}

		public void SetDefaultLcId(TEntity entity, int lcId)
		{ 
			QueryBuilder.SetDefaultLcId(entity.Id, lcId) ;
		}
	}
}